package com.linghang.lhonline.dataobject;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;

@Entity
@Data
public class Homework {

    @JsonProperty("mission_id")
    private Integer missionId;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @JsonProperty("homework_id")
    private Integer homeworkId;

    @JsonProperty("homework_url")
    private String homeworkUrl;

    @JsonIgnore
    private String studentId;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    @JsonProperty("post_time")
    private Date postTime;

}
